<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.min.js"></script>
</head>
<body>
    <!-- vue的一些指令 -->
    <div id="app">
        <p v-if="seen">这是if</p>
        <p v-else="seen">这是else</p>
        <button @click="run">点击切换</button>
    </div>
</body>
<script>
    // vue基本语法模板
    var vm = new Vue({
        el:'#app',
        data:{
            seen : true
        },
        methods: {
            run: function(){
                this.seen = !this.seen;
            }
        }
    })
</script>
</html>